import http from "../../utils/http"
export interface ClassifiesItem{
    _id?:string
    name?:string
    parentId?:number
    sort?:number
    state?:number
    children?:ClassifiesItem[]
}
export interface SeachParams{
    _id?:string,
    state?:number,
    name?:string
}
const goodsClassifies = {
    // 查询用户分组数据
    // search: (data?: object) => http.post('/userGroups/search', data),
    search:(data?:PageQuery&SeachParams)=>http.post("/classifies/search",data),
    // 新增用户分组数据
    add:(data: ClassifiesItem) => http.post('/classifies/add', data),
    // 删除用户分组数据
    remove: (data:DeleteParams) => http.delete('/classifies/remove', data),
    // 修改用户分组数据
    update: (data: ClassifiesItem) => http.put('/classifies/update', data)
}

export default goodsClassifies